package com.luych.toolbox.docker.service.sdk.container.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Map;

public class DockerContainerStatsResult {

    @JsonProperty("precpu_stats")
    private PrecpuStats precpuStats;

    @JsonProperty("cpu_stats")
    private CpuStats cpuStats;

    @JsonProperty("read")
    private String read;

    @JsonProperty("pids_stats")
    private PidsStats pidsStats;

    @JsonProperty("networks")
    private Map<String, Network> networks;

    @JsonProperty("memory_stats")
    private MemoryStats memoryStats;

    @JsonProperty("blkio_stats")
    private BlkioStats blkioStats;

    public PrecpuStats getPrecpuStats() {
        return precpuStats;
    }

    public void setPrecpuStats(PrecpuStats precpuStats) {
        this.precpuStats = precpuStats;
    }

    public CpuStats getCpuStats() {
        return cpuStats;
    }

    public void setCpuStats(CpuStats cpuStats) {
        this.cpuStats = cpuStats;
    }

    public String getRead() {
        return read;
    }

    public void setRead(String read) {
        this.read = read;
    }

    public PidsStats getPidsStats() {
        return pidsStats;
    }

    public void setPidsStats(PidsStats pidsStats) {
        this.pidsStats = pidsStats;
    }

    public Map<String, Network> getNetworks() {
        return networks;
    }

    public void setNetworks(Map<String, Network> networks) {
        this.networks = networks;
    }

    public MemoryStats getMemoryStats() {
        return memoryStats;
    }

    public void setMemoryStats(MemoryStats memoryStats) {
        this.memoryStats = memoryStats;
    }

    public BlkioStats getBlkioStats() {
        return blkioStats;
    }

    public void setBlkioStats(BlkioStats blkioStats) {
        this.blkioStats = blkioStats;
    }

    public static class PrecpuStats {

        @JsonProperty("system_cpu_usage")
        private Long systemCpuUsage;

        @JsonProperty("throttling_data")
        private CpuStats.ThrottlingData throttlingData;

        @JsonProperty("online_cpus")
        private Long onlineCpus;

        @JsonProperty("cpu_usage")
        private CpuUsage cpuUsage;

        public Long getSystemCpuUsage() {
            return systemCpuUsage;
        }

        public void setSystemCpuUsage(Long systemCpuUsage) {
            this.systemCpuUsage = systemCpuUsage;
        }

        public CpuStats.ThrottlingData getThrottlingData() {
            return throttlingData;
        }

        public void setThrottlingData(CpuStats.ThrottlingData throttlingData) {
            this.throttlingData = throttlingData;
        }

        public Long getOnlineCpus() {
            return onlineCpus;
        }

        public void setOnlineCpus(Long onlineCpus) {
            this.onlineCpus = onlineCpus;
        }

        public CpuUsage getCpuUsage() {
            return cpuUsage;
        }

        public void setCpuUsage(CpuUsage cpuUsage) {
            this.cpuUsage = cpuUsage;
        }
    }

    public static class CpuStats {

        @JsonProperty("system_cpu_usage")
        private Long systemCpuUsage;

        @JsonProperty("throttling_data")
        private ThrottlingData throttlingData;

        @JsonProperty("online_cpus")
        private Long onlineCpus;

        @JsonProperty("cpu_usage")
        private CpuUsage cpuUsage;

        public Long getSystemCpuUsage() {
            return systemCpuUsage;
        }

        public void setSystemCpuUsage(Long systemCpuUsage) {
            this.systemCpuUsage = systemCpuUsage;
        }

        public ThrottlingData getThrottlingData() {
            return throttlingData;
        }

        public void setThrottlingData(ThrottlingData throttlingData) {
            this.throttlingData = throttlingData;
        }

        public Long getOnlineCpus() {
            return onlineCpus;
        }

        public void setOnlineCpus(Long onlineCpus) {
            this.onlineCpus = onlineCpus;
        }

        public CpuUsage getCpuUsage() {
            return cpuUsage;
        }

        public void setCpuUsage(CpuUsage cpuUsage) {
            this.cpuUsage = cpuUsage;
        }

        public static class ThrottlingData {

            @JsonProperty("throttled_time")
            private Long throttledTime;

            @JsonProperty("periods")
            private Long periods;

            @JsonProperty("throttled_periods")
            private Long throttledPeriods;

            public Long getThrottledTime() {
                return throttledTime;
            }

            public void setThrottledTime(Long throttledTime) {
                this.throttledTime = throttledTime;
            }

            public Long getPeriods() {
                return periods;
            }

            public void setPeriods(Long periods) {
                this.periods = periods;
            }

            public Long getThrottledPeriods() {
                return throttledPeriods;
            }

            public void setThrottledPeriods(Long throttledPeriods) {
                this.throttledPeriods = throttledPeriods;
            }
        }
    }

    public static class PidsStats {

        @JsonProperty("current")
        private Long current;

        public Long getCurrent() {
            return current;
        }

        public void setCurrent(Long current) {
            this.current = current;
        }
    }

    public static class MemoryStats {

        @JsonProperty("failcnt")
        private Long failcnt;

        @JsonProperty("stats")
        private Stats stats;

        @JsonProperty("max_usage")
        private Long maxUsage;

        @JsonProperty("usage")
        private Long usage;

        @JsonProperty("limit")
        private Long limit;

        public Long getFailcnt() {
            return failcnt;
        }

        public void setFailcnt(Long failcnt) {
            this.failcnt = failcnt;
        }

        public Stats getStats() {
            return stats;
        }

        public void setStats(Stats stats) {
            this.stats = stats;
        }

        public Long getMaxUsage() {
            return maxUsage;
        }

        public void setMaxUsage(Long maxUsage) {
            this.maxUsage = maxUsage;
        }

        public Long getUsage() {
            return usage;
        }

        public void setUsage(Long usage) {
            this.usage = usage;
        }

        public Long getLimit() {
            return limit;
        }

        public void setLimit(Long limit) {
            this.limit = limit;
        }

        public static class Stats {

            @JsonProperty("inactive_anon")
            private Long inactiveAnon;

            @JsonProperty("total_pgfault")
            private Long totalPgfault;

            @JsonProperty("total_unevictable")
            private Long totalUnevictable;

            @JsonProperty("pgfault")
            private Long pgfault;

            @JsonProperty("mapped_file")
            private Long mappedFile;

            @JsonProperty("total_pgpgout")
            private Long totalPgpgout;

            @JsonProperty("total_active_anon")
            private Long totalActiveAnon;

            @JsonProperty("total_rss")
            private Long totalRss;

            @JsonProperty("rss")
            private Long rss;

            @JsonProperty("total_inactive_anon")
            private Long totalInactiveAnon;

            @JsonProperty("active_file")
            private Long activeFile;

            @JsonProperty("total_mapped_file")
            private Long totalMappedFile;

            @JsonProperty("total_inactive_file")
            private Long totalInactiveFile;

            @JsonProperty("total_rss_huge")
            private Long totalRssHuge;

            @JsonProperty("cache")
            private Long cache;

            @JsonProperty("rss_huge")
            private Long rssHuge;

            @JsonProperty("total_pgpgin")
            private Long totalPgpgin;

            @JsonProperty("unevictable")
            private Long unevictable;

            @JsonProperty("active_anon")
            private Long activeAnon;

            @JsonProperty("total_active_file")
            private Long totalActiveFile;

            @JsonProperty("hierarchical_memory_limit")
            private Long hierarchicalMemoryLimit;

            @JsonProperty("total_cache")
            private Long totalCache;

            @JsonProperty("pgpgin")
            private Long pgpgin;

            @JsonProperty("pgmajfault")
            private Long pgmajfault;

            @JsonProperty("inactive_file")
            private Long inactiveFile;

            @JsonProperty("writeback")
            private Long writeback;

            @JsonProperty("pgpgout")
            private Long pgpgout;

            @JsonProperty("total_pgmajfault")
            private Long totalPgmajfault;

            @JsonProperty("total_writeback")
            private Long totalWriteback;

            public Long getInactiveAnon() {
                return inactiveAnon;
            }

            public void setInactiveAnon(Long inactiveAnon) {
                this.inactiveAnon = inactiveAnon;
            }

            public Long getTotalPgfault() {
                return totalPgfault;
            }

            public void setTotalPgfault(Long totalPgfault) {
                this.totalPgfault = totalPgfault;
            }

            public Long getTotalUnevictable() {
                return totalUnevictable;
            }

            public void setTotalUnevictable(Long totalUnevictable) {
                this.totalUnevictable = totalUnevictable;
            }

            public Long getPgfault() {
                return pgfault;
            }

            public void setPgfault(Long pgfault) {
                this.pgfault = pgfault;
            }

            public Long getMappedFile() {
                return mappedFile;
            }

            public void setMappedFile(Long mappedFile) {
                this.mappedFile = mappedFile;
            }

            public Long getTotalPgpgout() {
                return totalPgpgout;
            }

            public void setTotalPgpgout(Long totalPgpgout) {
                this.totalPgpgout = totalPgpgout;
            }

            public Long getTotalActiveAnon() {
                return totalActiveAnon;
            }

            public void setTotalActiveAnon(Long totalActiveAnon) {
                this.totalActiveAnon = totalActiveAnon;
            }

            public Long getTotalRss() {
                return totalRss;
            }

            public void setTotalRss(Long totalRss) {
                this.totalRss = totalRss;
            }

            public Long getRss() {
                return rss;
            }

            public void setRss(Long rss) {
                this.rss = rss;
            }

            public Long getTotalInactiveAnon() {
                return totalInactiveAnon;
            }

            public void setTotalInactiveAnon(Long totalInactiveAnon) {
                this.totalInactiveAnon = totalInactiveAnon;
            }

            public Long getActiveFile() {
                return activeFile;
            }

            public void setActiveFile(Long activeFile) {
                this.activeFile = activeFile;
            }

            public Long getTotalMappedFile() {
                return totalMappedFile;
            }

            public void setTotalMappedFile(Long totalMappedFile) {
                this.totalMappedFile = totalMappedFile;
            }

            public Long getTotalInactiveFile() {
                return totalInactiveFile;
            }

            public void setTotalInactiveFile(Long totalInactiveFile) {
                this.totalInactiveFile = totalInactiveFile;
            }

            public Long getTotalRssHuge() {
                return totalRssHuge;
            }

            public void setTotalRssHuge(Long totalRssHuge) {
                this.totalRssHuge = totalRssHuge;
            }

            public Long getCache() {
                return cache;
            }

            public void setCache(Long cache) {
                this.cache = cache;
            }

            public Long getRssHuge() {
                return rssHuge;
            }

            public void setRssHuge(Long rssHuge) {
                this.rssHuge = rssHuge;
            }

            public Long getTotalPgpgin() {
                return totalPgpgin;
            }

            public void setTotalPgpgin(Long totalPgpgin) {
                this.totalPgpgin = totalPgpgin;
            }

            public Long getUnevictable() {
                return unevictable;
            }

            public void setUnevictable(Long unevictable) {
                this.unevictable = unevictable;
            }

            public Long getActiveAnon() {
                return activeAnon;
            }

            public void setActiveAnon(Long activeAnon) {
                this.activeAnon = activeAnon;
            }

            public Long getTotalActiveFile() {
                return totalActiveFile;
            }

            public void setTotalActiveFile(Long totalActiveFile) {
                this.totalActiveFile = totalActiveFile;
            }

            public Long getHierarchicalMemoryLimit() {
                return hierarchicalMemoryLimit;
            }

            public void setHierarchicalMemoryLimit(Long hierarchicalMemoryLimit) {
                this.hierarchicalMemoryLimit = hierarchicalMemoryLimit;
            }

            public Long getTotalCache() {
                return totalCache;
            }

            public void setTotalCache(Long totalCache) {
                this.totalCache = totalCache;
            }

            public Long getPgpgin() {
                return pgpgin;
            }

            public void setPgpgin(Long pgpgin) {
                this.pgpgin = pgpgin;
            }

            public Long getPgmajfault() {
                return pgmajfault;
            }

            public void setPgmajfault(Long pgmajfault) {
                this.pgmajfault = pgmajfault;
            }

            public Long getInactiveFile() {
                return inactiveFile;
            }

            public void setInactiveFile(Long inactiveFile) {
                this.inactiveFile = inactiveFile;
            }

            public Long getWriteback() {
                return writeback;
            }

            public void setWriteback(Long writeback) {
                this.writeback = writeback;
            }

            public Long getPgpgout() {
                return pgpgout;
            }

            public void setPgpgout(Long pgpgout) {
                this.pgpgout = pgpgout;
            }

            public Long getTotalPgmajfault() {
                return totalPgmajfault;
            }

            public void setTotalPgmajfault(Long totalPgmajfault) {
                this.totalPgmajfault = totalPgmajfault;
            }

            public Long getTotalWriteback() {
                return totalWriteback;
            }

            public void setTotalWriteback(Long totalWriteback) {
                this.totalWriteback = totalWriteback;
            }
        }
    }

    public static class BlkioStats {
        @JsonProperty("io_service_bytes_recursive")
        private List<BlkioStat> ioServiceBytesRecursive;
        @JsonProperty("io_serviced_recursive")
        private List<BlkioStat> ioServicedRecursive;

        public List<BlkioStat> getIoServiceBytesRecursive() {
            return ioServiceBytesRecursive;
        }

        public void setIoServiceBytesRecursive(List<BlkioStat> ioServiceBytesRecursive) {
            this.ioServiceBytesRecursive = ioServiceBytesRecursive;
        }

        public List<BlkioStat> getIoServicedRecursive() {
            return ioServicedRecursive;
        }

        public void setIoServicedRecursive(List<BlkioStat> ioServicedRecursive) {
            this.ioServicedRecursive = ioServicedRecursive;
        }
    }

    public static class BlkioStat {
        @JsonProperty("major")
        private Long major;
        @JsonProperty("minor")
        private Long minor;
        @JsonProperty("op")
        private String op;
        @JsonProperty("value")
        private Long value;

        public Long getMajor() {
            return major;
        }

        public void setMajor(Long major) {
            this.major = major;
        }

        public Long getMinor() {
            return minor;
        }

        public void setMinor(Long minor) {
            this.minor = minor;
        }

        public String getOp() {
            return op;
        }

        public void setOp(String op) {
            this.op = op;
        }

        public Long getValue() {
            return value;
        }

        public void setValue(Long value) {
            this.value = value;
        }
    }

    public static class CpuUsage {

        @JsonProperty("percpu_usage")
        private List<Long> percpuUsage;

        @JsonProperty("usage_in_kernelmode")
        private Long usageInKernelmode;

        @JsonProperty("total_usage")
        private Long totalUsage;

        @JsonProperty("usage_in_usermode")
        private Long usageInUsermode;

        public List<Long> getPercpuUsage() {
            return percpuUsage;
        }

        public void setPercpuUsage(List<Long> percpuUsage) {
            this.percpuUsage = percpuUsage;
        }

        public Long getUsageInKernelmode() {
            return usageInKernelmode;
        }

        public void setUsageInKernelmode(Long usageInKernelmode) {
            this.usageInKernelmode = usageInKernelmode;
        }

        public Long getTotalUsage() {
            return totalUsage;
        }

        public void setTotalUsage(Long totalUsage) {
            this.totalUsage = totalUsage;
        }

        public Long getUsageInUsermode() {
            return usageInUsermode;
        }

        public void setUsageInUsermode(Long usageInUsermode) {
            this.usageInUsermode = usageInUsermode;
        }
    }

    public static class Network {

        @JsonProperty("tx_packets")
        private Long txPackets;

        @JsonProperty("tx_errors")
        private Long txErrors;

        @JsonProperty("tx_dropped")
        private Long txDropped;

        @JsonProperty("rx_dropped")
        private Long rxDropped;

        @JsonProperty("rx_bytes")
        private Long rxBytes;

        @JsonProperty("tx_bytes")
        private Long txBytes;

        @JsonProperty("rx_errors")
        private Long rxErrors;

        @JsonProperty("rx_packets")
        private Long rxPackets;

        public Long getTxPackets() {
            return txPackets;
        }

        public void setTxPackets(Long txPackets) {
            this.txPackets = txPackets;
        }

        public Long getTxErrors() {
            return txErrors;
        }

        public void setTxErrors(Long txErrors) {
            this.txErrors = txErrors;
        }

        public Long getTxDropped() {
            return txDropped;
        }

        public void setTxDropped(Long txDropped) {
            this.txDropped = txDropped;
        }

        public Long getRxDropped() {
            return rxDropped;
        }

        public void setRxDropped(Long rxDropped) {
            this.rxDropped = rxDropped;
        }

        public Long getRxBytes() {
            return rxBytes;
        }

        public void setRxBytes(Long rxBytes) {
            this.rxBytes = rxBytes;
        }

        public Long getTxBytes() {
            return txBytes;
        }

        public void setTxBytes(Long txBytes) {
            this.txBytes = txBytes;
        }

        public Long getRxErrors() {
            return rxErrors;
        }

        public void setRxErrors(Long rxErrors) {
            this.rxErrors = rxErrors;
        }

        public Long getRxPackets() {
            return rxPackets;
        }

        public void setRxPackets(Long rxPackets) {
            this.rxPackets = rxPackets;
        }
    }
}